home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_8003.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  74 lines

  1. -- card: 8003 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2612
  5. -- name: CheckMenu
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=82 top=302 right=324 bottom=182
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put installres(XCMD,CheckMenu) into it
  24.   if it is empty then play oops
  25.   else answer it
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part contents for background part 2
  31. ----- text -----
  32. CheckMenu
  33.  
  34. -- part contents for background part 13
  35. ----- text -----
  36. 14
  37.  
  38. -- part contents for background part 3
  39. ----- text -----
  40.  
  41. CheckMenu lets you add and remove check marks for items in menus you've created using the NewMenu* XFCN.  Examples:
  42.  
  43.   CheckMenu myMenu, 2, TRUE
  44.   CheckMenu myMenu, 3, (the userLevel>2)
  45.  
  46. The first example will place a check mark next to the second menu item in menu "myMenu".  The second example will place a check mark next to the third item in "myMenu" IF the userLevel is greater than 2.
  47.  
  48. The menu number you provide to to CheckMenu should be the same number that was returned by NewMenu*.
  49.  
  50. •••
  51.  
  52. All the credit, (even the descriptions above) go to the creator of this ingenious XCMD:
  53.  
  54. Nine to Five Software Company
  55. P.O. Box 915
  56. Greenwood, IN  46142
  57. (317) 887-2154
  58. & Michael Long
  59.  
  60. See also NewMenu*, EnableMenu*, DeleteMenu*,  ChangeMenu*, and ShowMenu*
  61.  
  62.  
  63. -- part contents for background part 10
  64. ----- text -----
  65. Syntax:
  66.  
  67. CheckMenu <menuNumber>,
  68. <itemNumber>,TRUE/FALSE
  69.  
  70. <menuNumber> is the MenuID that was returned by NewMenu when the menu was created.
  71.  
  72. <itemNumber> is the number of the item in the menu (starting at 1 for the first item in the menu .)
  73.  
  74. TRUE checks that item.  FALSE unchecks the item.